<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>register.jsp</title>
    <script type="text/javascript">
    	function changeImage(img){
    		img.src = img.src + "?" +new Date().getTime();
    	}
    </script>
  </head>
  
  <body >
  	<h2 align="center">快速注册</h2>
  	<form action="${pageContext.request.contextPath }/RegisterServlet" method="post">
  	<table align="center">
  		<tr>
  			<td>用户名：</td>
  			<td>
  				<input type="text" name="username" value="${form.username }">
  			</td>
  			<td><span>${form.errors.username}</span></td>
  		</tr>
  		<tr>
  			<td>密码:</td>
  			<td>
  				<input type="password" name="password" value="${form.password }">
  			</td>
  			<td><span>${form.errors.password}</span></td>
  		</tr>
  		<tr>
  			<td>确认密码:</td>
  			<td>
  				<input type="password" name="password2" value="${form.password2 }">
  			</td>
  			<td><span>${form.errors.password2}</span></td>
  		</tr>
  		<tr>
  			<td>认证码：</td>
  			<td>
	  			<input type="text" name="checkcode">
	  		</td>
	  		<td>
	  			<img src="${pageContext.request.contextPath }/ImageServlet" onclick="changeImage(this)" alt="换一张" style="cursor:hand" >
  			</td>
  			<td><span>${form.errors.checkcode}</span></td>
  		</tr>
  		<tr>
  			<td><input type="reset" value="重置"></td>
  			<td><input type="submit" value="注册"></td>
  		</tr>
  	</table>
	</form>	
  </body>
</html>





